﻿// MT291




using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category2
{
  public class MT291 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagDefinition U0004;
    private static SwiftTagSubItemDefinition U0005;
    private static SwiftTagDefinition U0006;
    private static SwiftTagSubItemDefinition U0007;
    private static SwiftTagSubItemDefinition U0008;
    private static SwiftTagChoiceDefinition U000E;
    private static SwiftTagDefinition U000F;
    private static SwiftTagSubItemDefinition U0010;
    private static SwiftTagSubItemDefinition U0011;
    private static SwiftTagDefinition U0012;
    private static SwiftTagSubItemDefinition U0013;
    private static SwiftTagSubItemDefinition U0014;
    private static SwiftTagChoiceDefinition U0015;
    private static SwiftTagDefinition U0016;
    private static SwiftTagSubItemDefinition U0017;
    private static SwiftTagSubItemDefinition U0018;
    private static SwiftTagDefinition U0019;
    private static SwiftTagSubItemDefinition U001A;
    private static SwiftTagSubItemDefinition U001B;
    private static SwiftTagDefinition U001C;
    private static SwiftTagSubItemDefinition U001D;
    private static SwiftTagSubItemDefinition U001E;
    private static SwiftTagDefinition U001F;
    private static SwiftTagDefinition U007F;

    [Description("Transaction Reference Number")]
    public Tag20 TransactionReferenceNumber_20
    {
      get
      {
        return new Tag20((SwiftElement) this, 0, (SwiftDefinitionElement) MT291.U0002);
      }
    }

    [Description("Transaction Reference Number")]
    public Tag20 Tag20_TransactionReferenceNumber
    {
      get
      {
        return this.TransactionReferenceNumber_20;
      }
    }

    [Description("Related Reference")]
    public Tag21 RelatedReference_21
    {
      get
      {
        return new Tag21((SwiftElement) this, 0, (SwiftDefinitionElement) MT291.U0004);
      }
    }

    [Description("Related Reference")]
    public Tag21 Tag21_RelatedReference
    {
      get
      {
        return this.RelatedReference_21;
      }
    }

    [Description("Currency Code, Amount")]
    public Tag32B CurrencyCodeAmount_32B
    {
      get
      {
        return new Tag32B((SwiftElement) this, 0, (SwiftDefinitionElement) MT291.U0006);
      }
    }

    [Description("Currency Code, Amount")]
    public Tag32B Tag32B_CurrencyCodeAmount
    {
      get
      {
        return this.CurrencyCodeAmount_32B;
      }
    }

    [Description("Ordering Institution")]
    public Tag52A OrderingInstitution_52A
    {
      get
      {
        return new Tag52A((SwiftElement) this, 0, (SwiftDefinitionElement) MT291.U000F);
      }
    }

    [Description("Ordering Institution")]
    public Tag52A Tag52A_OrderingInstitution
    {
      get
      {
        return this.OrderingInstitution_52A;
      }
    }

    [Description("Ordering Institution")]
    public MT291.Tag52D OrderingInstitution_52D
    {
      get
      {
        return new MT291.Tag52D((SwiftElement) this, 0, (SwiftDefinitionElement) MT291.U0012);
      }
    }

    [Description("Ordering Institution")]
    public MT291.Tag52D Tag52D_OrderingInstitution
    {
      get
      {
        return this.OrderingInstitution_52D;
      }
    }

    [Description("Account With Institution")]
    public Tag57A AccountWithInstitution_57A
    {
      get
      {
        return new Tag57A((SwiftElement) this, 0, (SwiftDefinitionElement) MT291.U0016);
      }
    }

    [Description("Account With Institution")]
    public Tag57A Tag57A_AccountWithInstitution
    {
      get
      {
        return this.AccountWithInstitution_57A;
      }
    }

    [Description("Account With Institution")]
    public MT291.Tag57B AccountWithInstitution_57B
    {
      get
      {
        return new MT291.Tag57B((SwiftElement) this, 0, (SwiftDefinitionElement) MT291.U0019);
      }
    }

    [Description("Account With Institution")]
    public MT291.Tag57B Tag57B_AccountWithInstitution
    {
      get
      {
        return this.AccountWithInstitution_57B;
      }
    }

    [Description("Account With Institution")]
    public Tag57D AccountWithInstitution_57D
    {
      get
      {
        return new Tag57D((SwiftElement) this, 0, (SwiftDefinitionElement) MT291.U001C);
      }
    }

    [Description("Account With Institution")]
    public Tag57D Tag57D_AccountWithInstitution
    {
      get
      {
        return this.AccountWithInstitution_57D;
      }
    }

    [Description("Details Of Charges")]
    public Tag71B DetailsOfCharges_71B
    {
      get
      {
        return new Tag71B((SwiftElement) this, 0, (SwiftDefinitionElement) MT291.U001F);
      }
    }

    [Description("Details Of Charges")]
    public Tag71B Tag71B_DetailsOfCharges
    {
      get
      {
        return this.DetailsOfCharges_71B;
      }
    }

    [Description("Sender to Receiver Information")]
    public MT291.Tag72 SenderToReceiverInformation_72
    {
      get
      {
        return new MT291.Tag72((SwiftElement) this, 0, (SwiftDefinitionElement) MT291.U007F);
      }
    }

    [Description("Sender to Receiver Information")]
    public MT291.Tag72 Tag72_SenderToReceiverInformation
    {
      get
      {
        return this.SenderToReceiverInformation_72;
      }
    }

    public MT291()
      : base(true)
    {
    }

    public MT291(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT291.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT291.MessageDefinition = new SwiftMessageDefinition("MT291", "Request for Payment of Charges, Interest and Other Expenses");
      MT291.U0002 = new SwiftTagDefinition("TransactionReferenceNumber_20", "Transaction Reference Number");
      MT291.U0002.TagName = ":20:";
      MT291.U0003 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT291.U0002.Elements.Add((SwiftDefinitionElement) MT291.U0003);
      MT291.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT291.U0002);
      MT291.U0004 = new SwiftTagDefinition("RelatedReference_21", "Related Reference");
      MT291.U0004.TagName = ":21:";
      MT291.U0005 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT291.U0004.Elements.Add((SwiftDefinitionElement) MT291.U0005);
      MT291.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT291.U0004);
      MT291.U0006 = new SwiftTagDefinition("CurrencyCodeAmount_32B", "Currency Code, Amount");
      MT291.U0006.TagName = ":32B:";
      MT291.U0007 = new SwiftTagSubItemDefinition("Currency", "Currency");
      MT291.U0006.Elements.Add((SwiftDefinitionElement) MT291.U0007);
      MT291.U0008 = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT291.U0006.Elements.Add((SwiftDefinitionElement) MT291.U0008);
      MT291.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT291.U0006);
      MT291.U000E = new SwiftTagChoiceDefinition("Choice", "");
      MT291.U000E.Mandatory = false;
      MT291.U000E.Multiple = true;
      MT291.U000F = new SwiftTagDefinition("OrderingInstitution_52A", "Ordering Institution");
      MT291.U000F.TagName = ":52A:";
      MT291.U0010 = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT291.U0010.Mandatory = false;
      MT291.U000F.Elements.Add((SwiftDefinitionElement) MT291.U0010);
      MT291.U0011 = new SwiftTagSubItemDefinition("BankIdentifierCode", "Bank Identifier Code");
      MT291.U000F.Elements.Add((SwiftDefinitionElement) MT291.U0011);
      MT291.U000E.Elements.Add((SwiftDefinitionElement) MT291.U000F);
      MT291.U0012 = new SwiftTagDefinition("OrderingInstitution_52D", "Ordering Institution");
      MT291.U0012.TagName = ":52D:";
      MT291.U0013 = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT291.U0013.Mandatory = false;
      MT291.U0012.Elements.Add((SwiftDefinitionElement) MT291.U0013);
      MT291.U0014 = new SwiftTagSubItemDefinition("NameAndAddress", "Name & Address");
      MT291.U0012.Elements.Add((SwiftDefinitionElement) MT291.U0014);
      MT291.U000E.Elements.Add((SwiftDefinitionElement) MT291.U0012);
      MT291.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT291.U000E);
      MT291.U0015 = new SwiftTagChoiceDefinition("Choice", "");
      MT291.U0015.Mandatory = false;
      MT291.U0015.Multiple = true;
      MT291.U0016 = new SwiftTagDefinition("AccountWithInstitution_57A", "Account With Institution");
      MT291.U0016.TagName = ":57A:";
      MT291.U0017 = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT291.U0017.Mandatory = false;
      MT291.U0016.Elements.Add((SwiftDefinitionElement) MT291.U0017);
      MT291.U0018 = new SwiftTagSubItemDefinition("BankIdentifierCode", "Bank Identifier Code");
      MT291.U0016.Elements.Add((SwiftDefinitionElement) MT291.U0018);
      MT291.U0015.Elements.Add((SwiftDefinitionElement) MT291.U0016);
      MT291.U0019 = new SwiftTagDefinition("AccountWithInstitution_57B", "Account With Institution");
      MT291.U0019.TagName = ":57B:";
      MT291.U001A = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT291.U001A.Mandatory = false;
      MT291.U0019.Elements.Add((SwiftDefinitionElement) MT291.U001A);
      MT291.U001B = new SwiftTagSubItemDefinition("Location", "Location");
      MT291.U001B.Mandatory = false;
      MT291.U0019.Elements.Add((SwiftDefinitionElement) MT291.U001B);
      MT291.U0015.Elements.Add((SwiftDefinitionElement) MT291.U0019);
      MT291.U001C = new SwiftTagDefinition("AccountWithInstitution_57D", "Account With Institution");
      MT291.U001C.TagName = ":57D:";
      MT291.U001D = new SwiftTagSubItemDefinition("PartyIdentifier", "Party Identifier");
      MT291.U001D.Mandatory = false;
      MT291.U001C.Elements.Add((SwiftDefinitionElement) MT291.U001D);
      MT291.U001E = new SwiftTagSubItemDefinition("NameAndAddress", "Name & Address");
      MT291.U001C.Elements.Add((SwiftDefinitionElement) MT291.U001E);
      MT291.U0015.Elements.Add((SwiftDefinitionElement) MT291.U001C);
      MT291.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT291.U0015);
      MT291.U001F = new SwiftTagDefinition("DetailsOfCharges_71B", "Details Of Charges");
      MT291.U001F.TagName = ":71B:";
      MT291.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT291.U001F);
      MT291.U007F = new SwiftTagDefinition("SenderToReceiverInformation_72", "Sender to Receiver Information");
      MT291.U007F.TagName = ":72:";
      MT291.U007F.Mandatory = false;
      MT291.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT291.U007F);
    }

    public class Tag52D : SwiftTagWrapper
    {
      public string Value
      {
        get
        {
          return this.GetValue();
        }
        set
        {
          this.SetValue("52D", value);
        }
      }

      internal Tag52D(SwiftElement parent, int index, SwiftDefinitionElement definition)
        : base(parent, index, definition)
      {
      }
    }

    public class Tag57B : SwiftTagWrapper
    {
      public string Value
      {
        get
        {
          return this.GetValue();
        }
        set
        {
          this.SetValue("57B", value);
        }
      }

      internal Tag57B(SwiftElement parent, int index, SwiftDefinitionElement definition)
        : base(parent, index, definition)
      {
      }
    }

    public class Tag72 : SwiftTagWrapper
    {
      public string Value
      {
        get
        {
          return this.GetValue();
        }
        set
        {
          this.SetValue("72", value);
        }
      }

      internal Tag72(SwiftElement parent, int index, SwiftDefinitionElement definition)
        : base(parent, index, definition)
      {
      }
    }
  }
}
